home *** CD-ROM | disk | FTP | other *** search
- Path: news.cais.com!NewsWatcher!user
- From: lbecker@avtec.com (Lynn Becker)
- Newsgroups: comp.unix.solaris,comp.unix.programmer,comp.lang.c
- Subject: inline code
- Date: Wed, 31 Jan 1996 13:34:21 -0500
- Organization: Avtec Systems Inc
- Distribution: inet
- Message-ID: <lbecker-3101961334210001@206.161.148.20>
- NNTP-Posting-Host: 206.161.148.20
- X-Newsreader: Yet Another NewsWatcher 2.2.0b4
-
- Hi,
-
- I have some code that I am trying to port to the SparcStation 20 (Solaris 2.4).
- We have the sparcworks c compiler. (/opt/SUNWspro/bin/cc) and it is
- choking on an inline keyword (directive to the previous compiler?). I am
- looking at the manual and the man pages, but haven't decided whether there
- is a way to make the sun comiler accepts this notation. Does the gcc
- compiler accept this? Here is a snippet of the code I am using.
-
-
- inline double mathFindVectorMag
- (
- CARTESIAN_STRUCT * pVector
- )
- {
- return sqrt (pVector->X * pVector->X + pVector->Y * pVector->Y +
- pVector->Z * pVector->Z);
- }
-
- The sun compiler gives me an error:
-
- mathVectorRoutines.c:
- "./mathVectorRoutines.h", line 43: undefined or not a type: inline
-
- --
- Lynn W. Becker lbecker@avtec.com
- Avtec Systems Inc (703) 273-2211
- 10530 Rosehaven Street, Suite 300 (703) 273-1313 FAX
- Fairfax, VA 22030
-